package com.acme.task6;

import java.util.*;
import java.io.*;
import java.io.File;
import java.io.FileNotFoundException;

public class RegEx {
	   public static void main(String[] args) throws FileNotFoundException {
		   String s = "";
           Scanner in = new Scanner(new File("MyClass.java"));
           PrintWriter out = new PrintWriter("1234.txt");
	    
	    
	        while(in.hasNext()) {
	           
	        	s += in.nextLine() + "\r\n";
	        }
	        
	        s=s.replaceAll("(?:/\\*(?:[^*]|(?:\\*+[^*/]))*\\*+/)|(?://.*)","");
	   
	        System.out.println(s);
	        out.println(s);
	        out.close();
	        in.close();
	    }
	}
